#include "mainwindow.H"
#include "ui_mainwindow.h"
#include "welcome.h"
#include <QMessageBox>


MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

}

MainWindow::~MainWindow()
{
    delete ui;
}



void MainWindow::on_actionAceptar_triggered()
{

}

void MainWindow::on_btnAcept_clicked()
{
    QString pass;
    pass="1";

    if (ui->LEpass->text()==pass)
    {
        close();
        Welcome welcome(this);
        welcome.exec();
    }
    else
    QMessageBox::critical(this,"Error","Usuario Invalido",QMessageBox::Retry);
}

void MainWindow::on_btnCanc_clicked()
{
    close();
}
